package cn.wolfcode.luowowo.article.service;

import cn.wolfcode.luowowo.article.domain.ItemShop;
import cn.wolfcode.luowowo.article.query.ItemShopQuery;
import cn.wolfcode.luowowo.member.domain.UserInfo;
import cn.wolfcoe.luowowo.common.util.AjaxResult;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 目的的服务
 */
public interface IItemShopService {

    /**
     * 添加或更新
     *
     * @param itemShop
     */
    void saveOrUpdate(ItemShop itemShop);

    /**
     * 分页查询
     *
     * @param qo
     * @return
     */
    PageInfo query(ItemShopQuery qo);

    /**
     * 查询所有
     *
     * @return
     */
    List<ItemShop> list();

    /**
     * 查询单个
     * @param id
     * @return
     */
    ItemShop get(Long id);

    /**
     * 减少商品数量
     * @param userInfo
     * @param itemShop
     * @return
     */
    AjaxResult reduce(UserInfo userInfo,ItemShop itemShop);
}
